<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		
	    <base href="<%=basePath%>">
	    
		<title>Spring Security 3</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">    
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
	
		<link rel="stylesheet" type="text/css" href="style/loginstyle.css" />
		
		<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script> 
		<script type="text/javascript" src="js/jquery.validate.js"></script>
		<script type="text/javascript">  
		    $(document).ready(function(){  
		        $("#loginform").validate();  
		    });  
		</script>  
		<script type="text/javascript">
		
			if(window.top.frames.length>0){
				window.top.location.href='/login.jsp';
			}
		</script>
	</head>

	<body onload="javascript:document.forms[0].j_username.focus();">
		<br />
		<!-- <center>
			<form name="loginform" action="j_spring_security_check" method="POST" onsubmit="return check();">
				<table align="center" width="600" height="468" style="background-image: url();">
					<tr>
						<td height="100"></td>
						<td height="100"></td>
					</tr>
					<tr>
						<td width="220"></td>
						<td>
							<font size="2">
								<span style="color: black"> 用户名</span>
								<input id="username" type='text' name="j_username" value="robin" style="width: 100px">
								<span style="color: black">密码</span>
								<input id="pwd" type='password' name='j_password' value="robin" style="width: 100px">
								<input name="submit" type="submit" value="登录" class="btn">
							</font>
						</td>
					</tr>
				</table>
			</form>
		</center> -->
		
		
		<form name="loginform" action="j_spring_security_check" method="POST" onsubmit="return check();">
			<fieldset>
				<legend>登录</legend>
				<label for="login">用户名</label>
				<input type="text" id="username" name="j_username" value="${sessionScope['SPRING_SECURITY_LAST_USERNAME']}" />
				<div class="clear"></div>
				<label for="password">密码</label>
				<input type="password" id="pwd" name="j_password"/>
				<div class="clear"></div>
				<label for="remember_me" style="padding: 0;">记住密码?</label>
				<input type="checkbox" id="remember_me" style="position: relative; top: 3px; margin: 0; " name="_spring_security_remember_me"/>
				<div class="clear"></div>
				<br />
				
					<span>${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message} </span>
				<input type="submit" style="margin: -20px 0 0 287px;" class="button" name="commit" value="登录"/>
			</fieldset>
		</form>
		
	</body>
</html>
